<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>  

<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	
	<title>Uniscol</title>
	
	<!-- Latest compiled and minified CSS -->
	<link rel="stylesheet" href="<c:url value="/resources/bootstrap/css/bootstrap.min.css" />">
	<!-- Optional theme -->
	<link rel="stylesheet" href="<c:url value="/resources/bootstrap/css/bootstrap-theme.min.css" />">
	
	<link rel="stylesheet" href="<c:url value="/resources/css/normalize.css" />">
	<link rel="stylesheet" href="<c:url value="/resources/css/main.css" />">
	
	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="<c:url value="/resources/js/main.js" />"></script>
</head>
<body>
	<div class="container">
		<div class="row">
		
		 <form:form modelAttribute="loginFormModel" role="form" action="login" name="login-form" method="post">
		   
			<div class="login">
				<c:if test="${not empty alert}">
			    	<div id="message" class="${alert.css}">
			    		<c:if test="${not empty alert.icon}">
			    			<span class="${alert.icon}"></span>
			    		</c:if>
			        	<spring:message code="${alert.messageCode}" text="${alert.defaultMessage}"  htmlEscape="true" />
			        </div>
			    </c:if>
				
				<div class="login_logo">
					<img src="<c:url value="/resources/img/logo_uniscol.jpg" />" alt="uniscol" class="img-rounded" />
				</div>
			    
		   		<form:errors path="*" cssClass="alert alert-warning" element="div" />
		   		
		    	<spring:message code="login.login" />:<form:input path="login" placeholder="" required="true" class="form-control" />
		    	<spring:message code="login.password" />: <form:password path="password"  placeholder="" required="true" class="form-control" />
		      <%--<input type="text" placeholder="Identifiant" required name="login" value="${login}" />
		     <input type="password" placeholder="Mot de passe" required name="password" />
		       --%>
		    	<button id="login-btn" type="submit" data-loading-text="Connexion..." class="btn btn-primary">Connexion</button>
	  		</div>
  		 </form:form>
  		 </div>
  	</div>
 	
	<!-- Latest compiled and minified JavaScript -->
	<script src="<c:url value="/resources/bootstrap/js/bootstrap.min.js" />"></script>
</body>
</html>